package com.srs.filter;

import org.apache.struts2.dispatcher.FilterDispatcher;
import org.hibernate.HibernateException;

import javax.servlet.*;

import com.srs.util.HibernateUtil;

public class Struts2Dispatcher extends FilterDispatcher {
	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		super.init(filterConfig);
		try {
			HibernateUtil.createSessionFactory();
			System.out.print("application initializing successfully");
		} catch (HibernateException e) {
			System.out.println(e.getMessage());
			throw new ServletException(e);
		}
	}
	
}
